<template>
  <header-sidebar-skeleton :header-nav-items="headerNavItems" :sidebar-items="sidebarItems"></header-sidebar-skeleton>
</template>

<script>
import HeaderSidebarSkeleton from "../../components/header-sidebar/HeaderSidebarSkeleton.vue";
import {normalNavItems, accountSidebarItems, adminNavItems} from "./skeletons-data";

export default {
  name: "AccountSkeleton",
  components: {HeaderSidebarSkeleton},
  data() {
    return {
      headerNavItems: this.$store.state.user.user_type === 'admin' ? adminNavItems : normalNavItems,
      sidebarItems: accountSidebarItems
    }
  },
  watch: {
    '$store.state.user.user_type': function (newVal, oldVal) {
      this.headerNavItems = newVal === 'admin' ? adminNavItems : normalNavItems;
    }
  }
}
</script>

<style scoped>

</style>